import React, { Component } from 'react'
import { Space, Swiper } from 'antd-mobile'
import youshiimg from '@assets/img/youshi.png'

export default class MySwiper extends Component {
  render() {
    if (this.props.rollImg.length === 0) {
      return false
    }
    return (
      <div className='sh_ca'>
        <Space direction='vertical' block>
          <Swiper style={{ '--border-radius': '8px', }} loop autoplay>
            {
              this.props.rollImg.map((item) => (
                <Swiper.Item key={item.id}>
                  <img src={item.picUrl} alt={item.picUrl} style={{ width: '100%', height: '2.8rem' }} />
                </Swiper.Item>
              ))
            }
          </Swiper>
        </Space>
        <img src={youshiimg} alt="优势" style={{ 'width': '100%', 'height': 'auto' }} />
      </div>
    )
  }
}
